package com.zhang.crm.controller;


import com.zhang.crm.pojo.TTranHistory;
import com.zhang.crm.result.R;
import com.zhang.crm.service.TranHistoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TranHistoryController {

    @Resource
    private TranHistoryService tranHistoryService;
    @PostMapping("api/addTranHistory")
    public R addTranHistory(@RequestBody TTranHistory tTranHistory) {
        Boolean b = tranHistoryService.addTranHistory(tTranHistory);
        return b ? R.OK() : R.FAIL("提交交易历史失败");
    }
}
